<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Cart extends AppModel{
    var $name='Cart';
    var $primaryKey = 'cartid';
    var $belongsTo=array(
      'User' => array(
          'className' => 'User',
          'foreignKey' => 'userid'
      )
    );
    var $hasAndBelongsToMany = array(
        'Verhuuritem' => array(
            'className' => 'Verhuuritem',
            'joinTable' => 'carts_verhuuritems',
            'foreignKey' => 'cartid',
            'associationForeignKey' => 'verhuuritemid',
            'unique' => true,
            'with' => 'CartVerhuuritem'
        )
    );
    
}
?>
